

/**
 * 
 */
package com.pragati.util;
import java.util.Calendar;
/**
 * @author vtr
 *
 */
public class myUtil {

public String Greeter(){
	int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
    String greeting = null;
    if (hour >= 0 && hour <= 12)
          greeting = "Good Morning";
    else
    if (hour > 12 && hour <= 18)
          greeting = "Good Afternoon";
    else
    if (hour > 18 && hour <= 21)
          greeting = "Good Evening";
    else
    if (hour > 21 && hour <= 24)
          greeting = "Good Night";
	return greeting;
	
}
}
